package com.dmx.fw.bean.mapping.pojo;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Log generated by MyEclipse - Hibernate Tools
 */
@Entity
@Table(name="SYSTEM_LOG")
public class Log implements java.io.Serializable {

	@Id
	@GeneratedValue(strategy=GenerationType.AUTO,generator="log_seq_gen")
	@SequenceGenerator(name = "log_seq_gen", sequenceName = "SEQ_LOG")
	@Column(name = "ID", precision = 12, scale = 0)
	private Long logId;
	
	@Temporal(TemporalType.DATE)
	@Column(name = "LAST_UPDATED_TIME")
	private Date lastUpdatedTime;
	
	@Column(name="DESC_ID",precision = 12, scale = 0)
	private Long funcFk;
	
	@Column(name="OPTR_ID",precision = 12, scale = 0)
	private Long optrFk;
	
	@Column(name="IP",length=20)
	private String ip;
	
	@Column(name="REMARK",length=1000)
	private String remark;
	
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="CREATED_BY",insertable=false,updatable=false)
	private Operator createdOperator;
	
	@Temporal(TemporalType.DATE)
	@Column(name = "CREATED_TIME")
	private Date createdTime;
	
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="LAST_UPDATED_BY",insertable=false,updatable=false)
	private Operator lastUpdatedOperator;

	/** default constructor */
	public Log() {
	}

	/** full constructor */
	public Log(Long funcFk, Long optrFk, String ip, String remark,
			Operator createdOperator, Date createdTime,
			Operator lastUpdatedOperator) {
		this.funcFk = funcFk;
		this.optrFk = optrFk;
		this.ip = ip;
		this.remark = remark;
		this.createdOperator = createdOperator;
		this.createdTime = createdTime;
		this.lastUpdatedOperator = lastUpdatedOperator;
	}

	// Property accessors

	public Long getLogId() {
		return this.logId;
	}

	public void setLogId(Long logId) {
		this.logId = logId;
	}

	public Date getLastUpdatedTime() {
		return this.lastUpdatedTime;
	}

	public void setLastUpdatedTime(Date lastUpdatedTime) {
		this.lastUpdatedTime = lastUpdatedTime;
	}

	public Long getFuncFk() {
		return this.funcFk;
	}

	public void setFuncFk(Long funcFk) {
		this.funcFk = funcFk;
	}

	public Long getOptrFk() {
		return this.optrFk;
	}

	public void setOptrFk(Long optrFk) {
		this.optrFk = optrFk;
	}

	public String getIp() {
		return this.ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public Operator getCreatedOperator() {
		return this.createdOperator;
	}

	public void setCreatedOperator(Operator createdOperator) {
		this.createdOperator = createdOperator;
	}

	public Date getCreatedTime() {
		return this.createdTime;
	}

	public void setCreatedTime(Date createdTime) {
		this.createdTime = createdTime;
	}

	public Operator getLastUpdatedOperator() {
		return this.lastUpdatedOperator;
	}

	public void setLastUpdatedOperator(Operator lastUpdatedOperator) {
		this.lastUpdatedOperator = lastUpdatedOperator;
	}

}